package com.wiz.web.exception;

/**
 * 订单异常
 * @author Hakeny
 */
public class FuellingOrderException extends RuntimeException {
	private static final long serialVersionUID = -1086030407372739840L;
	
	private String msg;
	private String fuellingOrderId;
	private Integer type;//1:insert error 2:update error 3:calcul error
	
	public FuellingOrderException(String fuellingOrderId,String msg,Integer type){
		super();
		this.fuellingOrderId = fuellingOrderId;
		this.msg = msg;
		this.type = type;
	}
	
	public String  getMessage(){
		StringBuffer sb = new StringBuffer();
		sb.append(fuellingOrderId).append(" throws FuellingOrderException,msg="+msg+",in ");
		if(type == 1){
			sb.append("insert");
		}else if(type == 1){
			sb.append("update");
		}else if(type == 3){
			sb.append("calcul");
		}
		return sb.toString();
	}
}
